<?php require_once("../../includes/database.php");
	$db=new Database();
?>
<table width="441" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="3" align="left" valign="middle"></td>
      </tr>
      <tr>
        <td colspan="3" align="left" valign="middle"></td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>Userid :</td>
        <td width="256" align="left" valign="baseline"><input name="username" type="text" class="FormTextFeild" id="username" />
          <input type="hidden" name="role" id="role" value="1" /></td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>Password :</td>
        <td width="256" align="left" valign="baseline"><input name="password" type="password" class="FormTextFeild" id="password" />        </td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>Re-type Password :</td>
        <td width="256" align="left" valign="baseline"><input name="repassword" type="password" class="FormTextFeild" id="repassword"  />        </td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>Name :</td>
        <td width="256" align="left" valign="baseline"><input name="name" type="text" class="FormTextFeild" id="name"  />        </td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>Year :</td>
        <td width="256" align="left" valign="baseline"><select name="year" class="FormTextFeild" id="year" >
            <?php 
			$year_res=$db->query("select * from year_details where visibility=1");
			while($year_row=mysql_fetch_array($year_res))
				{
?>
            <option value="<?php echo $year_row['year_id']; ?>"><?php echo $year_row['year_name']; ?></option>
            <?php 
}
?>
          </select>        </td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>Register number :</td>
        <td width="256" align="left" valign="baseline"><input name="regno" type="text" class="FormTextFeild" id="regno" maxlength="11" /></td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>House :</td>
        <td width="256" align="left" valign="baseline"><select name="house" class="FormTextFeild" id="house" >
            <?php 
$house_res=$db->query("select * from house_details where visibility=1 ORDER BY `house_details`.`house_name` ASC");
while($house_row=mysql_fetch_array($house_res))
{
?>
            <option value="<?php echo $house_row['house_id']; ?>"><?php echo $house_row['house_name']; ?></option>
            <?php 
}
?>
          </select>        </td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline"><span class="must">*</span>Committee :</td>
        <td width="256" align="left" valign="baseline"><select name="commitee" class="FormTextFeild" id="commitee">
            <?php 
$commitee_res=$db->query("select * from commitee_details where visibility=1 ORDER BY `commitee_details`.`commitee_name` ASC");
while($commitee_row=mysql_fetch_array($commitee_res))
{
?>
            <option value="<?php echo $commitee_row['commitee_id']; ?>"><?php echo $commitee_row['commitee_name']; ?></option>
            <?php 
}
?>
          </select>
            </select></td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline">E-mail ID :</td>
        <td width="256" align="left" valign="baseline"><input name="email" type="text" class="FormTextFeild" id="email" /></td>
      </tr>
      <tr>
        <td width="220" align="left" valign="middle"></td>
        <td colspan="2" align="left" valign="middle"></td>
      </tr>
      <tr>
        <td colspan="3" align="left" valign="baseline"></td>
      </tr>
      <tr>
        <td colspan="2" align="right" valign="baseline">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td width="220" align="right" valign="middle"><input type="image" name="imageField2" id="imageField2" src="img/buttons/back.gif" onclick="adduser()" /></td>
        <td width="9" align="right" valign="baseline">&nbsp;</td>
        <td width="256"><input type="image" name="imageField" id="imageField" src="img/buttons/submit.gif" onclick="check_adduser()" />        </td>
      </tr>
    </table>
